package jsj.mynet;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.net.UnknownHostException;

public class MyUdpSendDemo {

	public static void main(String[] args) throws Exception {
		DatagramSocket ds = new DatagramSocket();
		byte[] buf = "hello,UDP,Im coming!".getBytes();
		DatagramPacket dp = new DatagramPacket(buf, buf.length, InetAddress.getLocalHost(), 10086);
		ds.send(dp);
		ds.close();

	}

}
